<!--{include(pe_tpl('header.html'));}-->
<div class="right">
	<div class="now">
		<span class="fl c888">管理中心 > {$menutitle}</span>
		<span class="fr fabu"><a href="admin.php?mod=tag&act=add">添加标签</a></span>
		<div class="clear"></div>
	</div>
	<div class="right_main">
		<form method="post" enctype="multipart/form-data">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="wenzhang mat20">
		<tr>
			<td align="right" width="130">标签名称：</td>
			<td><input type="text" name="info[tag_name]" value="{$info['tag_name']}" class="inputall input300" /></td>
		</tr>
		<tr>
			<td align="right">标签选项：</td>
			<td>
				<div style="width:650px">
				<!--{for($i=0;$i<20;$i++):}-->
				<input type="text" name="tag_value[]" value="{$tag_value[$i]}" class="inputall input100 mab5 mar3" />
				<!--{endfor;}-->
				</div>			
			</td>
		</tr>
		</table>
		<div class="mat10 center"><input type="submit" name="pesubmit" value="提 交" class="tjbtn" /></div>
		</form>
	</div>
</div>
<script type="text/javascript" charset="utf-8">
function move_up(obj) {
    var current = $(obj).parent().parent();
    var prev = current.prev();  
    if (current.index()>1) current.insertBefore(prev); 
}  
function move_down(obj) {  
    var current = $(obj).parent().parent(); 
    var next = current.next();
    if (next) current.insertAfter(next);
}  
function tag_del(_this, tag_id) {
	if (tag_id == 0) {
		$(_this).parents("tr").remove();
	}
	else {
		$.getJSON("{$pe['host_root']}admin.php", {"mod":"tag","act":"del_data","id":tag_id},function(json){
			if (json.result == true) {
				$(_this).parents("tr").remove();
			}
			else {
				alert(json.show)
			}
		})
	}
}
var tag_datahtml = '<tr>';
tag_datahtml += '<td><input type="text" name="name[]" class="inputall" /><input type="hidden" name="isnew[]" value="1" /></td>';
tag_datahtml += '<td><img style="cursor:pointer;" title="向上移动" class="icon_up" onclick="move_up(this)" src="{$pe['host_tpl']}images/icon_up.gif" />';
tag_datahtml += ' <img style="cursor:pointer;" title="向上移动" class="icon_down mal10" onclick="move_down(this)" src="{$pe['host_tpl']}images/icon_down.gif" />';		
tag_datahtml += ' <img style="cursor:pointer;" title="向上移动" class="icon_del mal10" onclick="tag_del(this, 0)" src="{$pe['host_tpl']}images/icon_del.gif" />';		
tag_datahtml += '</td></tr>';
function tag_dataadd() {
	$("#tag_data").append(tag_datahtml);
}
</script>
<!--{include(pe_tpl('footer.html'));}-->